-- GENERATED SPELL FOR [Anub'ar Prime Guard] --


function spell0_29128(pUnit, Event) --@Drain Power,Self--
pUnit:FullCastSpellOnTarget(54314,pUnit)
pUnit:RegisterEvent('Sorts_29128', 30304, 1)
end

function spell1_29128(pUnit, Event) --@Drain Power,Self--
pUnit:FullCastSpellOnTarget(59354,pUnit)
pUnit:RegisterEvent('Sorts_29128', 30331, 1)
end

function spell2_29128(pUnit, Event) --@Mark of Darkness,n/a--
pUnit:FullCastSpellOnTarget(54309,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_29128', 12000, 1)
end

function spell3_29128(pUnit, Event) --@Mark of Darkness,n/a--
pUnit:FullCastSpellOnTarget(59352,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_29128', 10000, 1)
end

function Sorts_29128(pUnit, Event)
local choix_sorts_29128 = math.random(0, 3)
if choix_sorts_29128 == 0 then
pUnit:RegisterEvent('spell0_29128', 1, 1)
end
if choix_sorts_29128 == 1 then
pUnit:RegisterEvent('spell1_29128', 1, 1)
end
if choix_sorts_29128 == 2 then
pUnit:RegisterEvent('spell2_29128', 1, 1)
end
if choix_sorts_29128 == 3 then
pUnit:RegisterEvent('spell3_29128', 1, 1)
end
end

function mob29128_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_29128', math.random(1500, 3000), 1)
end

function mob29128_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob29128_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob29128_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(29128, 1, 'mob29128_Action')
RegisterUnitEvent(29128, 2, 'mob29128_Leave')
RegisterUnitEvent(29128, 3, 'mob29128_Kill')
RegisterUnitEvent(29128, 4, 'mob29128_Die')
